// 退款状态常量
export const RefundStatus = {
  PENDING: 'pending',
  APPROVED: 'approved',
  REJECTED: 'rejected',
  COMPLETED: 'completed',
  CANCELLED: 'cancelled'
} as const;

export type RefundStatus = typeof RefundStatus[keyof typeof RefundStatus];

// 退款原因常量
export const RefundReason = {
  QUALITY_ISSUE: '商品质量问题',
  DESCRIPTION_MISMATCH: '商品与描述不符',
  DAMAGED: '商品破损',
  OUT_OF_STOCK: '商品缺货',
  NOT_SATISFIED: '不喜欢/不合适',
  OTHER: '其他原因'
} as const;

export type RefundReason = typeof RefundReason[keyof typeof RefundReason];

// 支付方式常量
export const PaymentMethod = {
  ALIPAY: '支付宝',
  WECHAT: '微信支付',
  UNIONPAY: '银联支付',
  CREDIT_CARD: '信用卡'
} as const;

export type PaymentMethod = typeof PaymentMethod[keyof typeof PaymentMethod];

// 订单信息接口
export interface OrderInfo {
  orderId: string;
  productName: string;
  productSpecs: string;
  price: number;
  quantity: number;
  orderTime: string;
  paymentMethod: PaymentMethod;
  status: string;
}

// 退款信息接口
export interface RefundInfo {
  refundId: string;
  orderId: string;
  productName: string;
  refundAmount: number;
  applyTime: string;
  refundReason: RefundReason;
  status: RefundStatus;
  estimatedTime?: string;
  approveTime?: string;
  refundTime?: string;
  rejectTime?: string;
  refundMethod?: PaymentMethod;
  refundAccount?: string;
  rejectReason?: string;
  reviewerNote?: string;
}

// 进度步骤接口
export interface ProgressStep {
  title: string;
  desc: string;
  time: string;
  active: boolean;
}

// 退款申请表单接口
export interface RefundApplyForm {
  selectedReason: RefundReason | '';
  customReason: string;
  uploadedPhotos: { key?: string | number; url: string }[];
}

// 联系方式接口
export interface ContactItem {
  icon: React.ComponentType;
  text: string;
  onClick: () => void;
}

// API响应接口
export interface RefundApiResponse {
  success: boolean;
  message: string;
  data?: RefundInfo;
}

// 上传照片响应接口
export interface UploadPhotoResponse {
  success: boolean;
  url?: string;
  message?: string;
} 